﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace WinnerCMS.Data.Mapping
{
    public partial class ShopImgsMap
        : EntityTypeConfiguration<WinnerCMS.Model.GoodsImg>
    {
        public ShopImgsMap()
        {
            // table
            //ToTable("CMS_GoodsImg");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)

                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.GoodsId)

                .IsOptional();
            Property(t => t.Title)

                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.PicUrl)
                .IsUnicode(false)
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.TempGUID)

                .HasMaxLength(50)
                .IsOptional();

            // Relationships

            //InitializeMapping();
        }
    }
}

